import java.util.*;
import java.io.*;

public class RosterReader
{    
    public static Hashtable<Integer, Integer> readRoster(File file)
    {
        Hashtable<Integer, Integer> table = new Hashtable<Integer, Integer>();
        try
        {
            BufferedReader reader = new BufferedReader(new FileReader(file));
            reader.readLine(); //disposes first line
            String read = "";
            do
            {
                try
                {
                    read = reader.readLine();
                    if(read != null)
                    {
                        String[] bits = read.split(",");
                        Integer id = Integer.parseInt(bits[0]);
                        Integer cn = Integer.parseInt(bits[1]);
                        table.put(id,cn);
                    }
                }
                catch (Exception e)
                {
                    e.printStackTrace();
                }
            } while(read != null);
                
        }
        catch (Exception e) { }
        return table;
    }
}